package com.adlotto2.lcdns.util;

import android.util.Log;

import com.adlotto2.lcdns.cronos.data.CNLottoAdLottoData;

public class LottoAdd {
	
	private CNLottoAdLottoData mLottoAdLottoNumData;
	
	public LottoAdd(CNLottoAdLottoData dataSet){
		this.mLottoAdLottoNumData = dataSet;
		main();
	}
	
	public void main() {
		int[] arr = new int[6];
		for (int i = 0; i < arr.length; i++)
		{
			arr[i] = (int) ((Math.random() * 45) + 1);
			for (int j = 0; j < i; j++)
				if (arr[i] == arr[j])	{
					i--;
					break;
				}
		}
		for (int k = 0; k < arr.length; k++){
			Log.d("getAdressSido", "============"+arr[k]+"============");
//			System.out.println(arr[k]);
		}
		mLottoAdLottoNumData.lottoNum1 = String.valueOf(arr[0]);
		mLottoAdLottoNumData.lottoNum2 = String.valueOf(arr[1]);
		mLottoAdLottoNumData.lottoNum3 = String.valueOf(arr[2]);
		mLottoAdLottoNumData.lottoNum4 = String.valueOf(arr[3]);
		mLottoAdLottoNumData.lottoNum5 = String.valueOf(arr[4]);
		mLottoAdLottoNumData.lottoNum6 = String.valueOf(arr[5]);
	}
}
